package edu.iscas.xcheck.analysis.dom.model;

import java.util.HashMap;
import java.util.Map;

import edu.iscas.xcheck.analysis.dom.visitors.DomVisitor;

public interface AbstractDomNode {

	// Variable Declarations
		int type = -1;
		String tagName = "", xpath = "", text = "", id = "";
		Map<String, String> attributes = new HashMap<String, String>();
		int zindex = -1, level = -1;
		int[] coord = null;
		long hash = -1;
		int clickable = -1, visible = -1;
		boolean matched = false;

		public void accept(DomVisitor visitor);

		// Setters & Getters

		public String attr(String key);

		public int getNodeType();

		public void setNodeType(int nodeType);

		public String getTagName();

		public void setTagName(String tagName);

		public String getxPath();

		public void setxPath(String xPath);

		public String getText();

		public void setText(String text);

		public String getId();

		public void setId(String id);

		public Map<String, String> getAttributes();

		public void setAttributes(Map<String, String> attributes);

		public int getZindex();

		public void setZindex(int zindex);

		public int getLevel();

		public void setLevel(int level);

		public int[] getCoords();

		public void setCoords(int[] coords);

		public long getHash();

		public void setHash(long hash);

		public int isClickable();

		public void setClickable(int clickable);

		public int isVisible();

		public void setVisible(int visible);

		public boolean isMatched();

		public void setMatched(boolean matched);

		// Utility Methods

		public boolean isTag();

		public boolean isText();

		public Map<String, String> getDynDomData();
}
